package hotel.hotel;

public enum Properties implements IProperty {
	FUJIYAMA("Fujiyama", 4000, 100,
			new long[] { 2000, 1000, 1000 }, 500,
			new long[] { 50, 100, 150 }, 250),
	BOOMERANG("Boomerang", 1500, 250,
			new long[] { 3000 }, 2000,
			new long[] { 400 }, 600),
	L_ETOILE("L'Etoile", 3000, 300,
			new long[] { 3000, 2000, 2000, 2000, 2000 }, 4000,
			new long[] { 100, 200, 300, 400, 500 }, 750),
	PRESIDENT("President", 5000, 400,
			new long[] { 5000, 2500, 2500, 2500 }, 5000,
			new long[] { 200, 400, 600, 800 }, 1200),
	ROYAL("Royal", 2500, 250,
			new long[] { 3600, 2000, 2000, 2000 }, 3000,
			new long[] { 150, 250, 350, 450 }, 650),
	WAIKIKI("Waikiki", 4000, 350,
			new long[] { 3500, 2200, 2200, 2200, 2200 }, 5000,
			new long[] { 250, 350, 450, 550, 650 }, 1000),
	TAJ_MAHAL("Taj Mahal", 1000, 150,
			new long[] { 2500, 1000, 1000 }, 1000,
			new long[] { 100, 150, 200 }, 300),
	SAFARI("Safari", 2000, 200,
			new long[] { 3000, 1500, 1500 }, 2000,
			new long[] { 100, 200, 300 }, 500);
	
	// ATTRIBUTS
	
	private final String name;
	private final long cost;
	private final long entryCost;
	private final long[] buildingsCost;
	private final long funAreaCost;
	private final long[] rent;
	private final long funAreaRent;
	
	// CONSTRUCTEUR
	
	private Properties(String name, long cost, long entryCost,
			long[] buildingsCost, long funAreaCost,
			long[] rent, long funAreaRent) {
		this.name = name;
		this.cost = cost;
		this.entryCost = entryCost;
		this.buildingsCost = buildingsCost;
		this.funAreaCost = funAreaCost;
		this.rent = rent;
		this.funAreaRent = funAreaRent;
	}
	
	// REQUETES

	@Override
	public String getName() {
		return name;
	}

	@Override
	public long getCost() {
		return cost;
	}

	@Override
	public long getReCost() {
		return cost / 2;
	}

	@Override
	public long getEntryCost() {
		return entryCost;
	}

	@Override
	public int getCapacity() {
		return buildingsCost.length;
	}

	@Override
	public long getBuildingCost(int i) {
		return buildingsCost[i];
	}

	@Override
	public long getFunAreaCost() {
		return funAreaCost;
	}

	@Override
	public long getRent(int i) {
		return rent[i];
	}

	@Override
	public long getRent(int i, boolean funArea) {
		if (funArea) {
			if (i < getCapacity()) {
				throw new IllegalArgumentException();
			}
			return funAreaRent;
		}
		return rent[i];
	}

}
